<?php

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Contact>
 */
class ContactFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition()
    {
        $titles = ['Mr',['Ms','Miss']];
        $title = $this->faker->randomElement($titles);
        $title = $title=='Mr'? $title : $this->faker->randomElement($title);
        $firstName = $title=='Mr'? $this->faker->firstName('male'):$this->faker->firstName('female');
        return [
            'first_name' => $firstName,
            'last_name' => $this->faker->lastName,
            'title' => $title
        ];
    }
}
